package xyz.xtt.asset.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;
import xyz.xtt.asset.entity.TblAssetTransaction;

@Slf4j
@Component
public class ConfirmTransactionEventPublisher {

	@Autowired
	private ApplicationEventPublisher applicationEventPublisher;

	public void publish(TblAssetTransaction transaction) {
		ConfirmTransactionEvent event = new ConfirmTransactionEvent(this, transaction);
		applicationEventPublisher.publishEvent(event);
	}
}
